/*
 * Copyright (c) 2010 Philip Foulkes <philip.foulkes@gmail.com>
 *
 * This file is free software and is made available under the 
 * terms of the GNU General Public License, version 2, or at your
 * option, any later version
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef ___MSRP_ATTRIBUTE_VALUES__
#define ___MSRP_ATTRIBUTE_VALUES__

struct msrp_tspec
{
	uint16 max_frame_size;
	uint16 max_interval_frame;
};

struct msrp_data_frame_parameters
{
	uint8 destination_address [6];
	uint16 vlan_identifier;
};

struct msrp_priority_and_rank
{
//#ifdef __BIG_ENDIAN_BITFIELD
//	uint8 data_frame_priority : 3;
//	uint8 rank : 1;
//	uint8 reserved : 4;
//#elif defined (__LITTLE_ENDIAN_BITFIELD)
	uint8 reserved : 4;
	uint8 rank : 1;
	uint8 data_frame_priority : 3;
//#endif
};

#ifdef __KERNEL__

struct failure_notification
{
	u8 bridge_id [8];
	u8 failure_code;
};

struct msrp_attribute_value_talker_advertise
{
	u8 stream_id [8];
	struct msrp_data_frame_parameters msrp_data_frame_parameters;
	struct msrp_tspec msrp_tspec;
	struct msrp_priority_and_rank msrp_priority_and_rank;
	u32 accumulated_latency;
};

struct msrp_attribute_value_talker_failed
{
	u8 stream_id [8];
	struct msrp_data_frame_parameters msrp_data_frame_parameters;
	struct msrp_tspec msrp_tspec;
	struct msrp_priority_and_rank msrp_priority_and_rank;
	u32 accumulated_latency;
	struct failure_notification failure_notification;
};

struct msrp_attribute_value_listener
{
	u8 stream_id [8];
};

struct msrp_attriute_value_domain
{
    u8  sr_class_id;
    u8  sr_class_priority;
    u16 sr_class_vid;
};

#endif

#endif
